<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>用户管理</title>
	<!-- 用户 -->
	
	<jsp:include page="/js/common.jsp" />
	<script type="text/javascript" src="page/user/user.js"></script>
</head>

<body>
<div id="tb" style="padding:5px;height:auto">
	<div>
		<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="module.add();">新增</a>
		<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-edit'" onclick="module.edit();">修改</a>
		<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="module.deleted();">删除</a>
		当前用户:<%=String.valueOf(session.getAttribute("USER_NAME")) %>
	</div>
</div>
<table class="easyui-datagrid" id="userGrid"
	data-options="
		url: 'admin/user/paginate',
		method: 'post',
		rownumbers: true,
		pagination: true,
		fit: true,
		toolbar: '#tb'
	">
	<thead frozen="true">
		<tr>
			<th data-options="field:'id',width:50,checkbox:true">ID</th>
			<th data-options="field:'name',width:150">名称</th>
		</tr>
	</thead>
	<thead>
		<tr>
			<th data-options="field:'password',width:150">密码</th>
			<th data-options="field:'sex',width:50,align:'center',
				formatter:function(value, row, index) {
					return value == 0 ? '女' : '男';
				}">性别</th>
			<th data-options="field:'isDeleted',width:50,align:'center',
				formatter:function(value, row, index) {
					return value == 0 ? '正常' : '禁用';
				}">状态</th>
			<th data-options="field:'memo',width:150">备注</th>
			<th data-options="field:'createTime',width:130">创建时间</th>
		</tr>
	</thead>
</table>

<div id="userDialog" class="easyui-dialog" title=" "
	style="width:620px;height:250px;"
	data-options="modal:true,buttons:'#dlg-buttons',closed:true">
	<form id="userFrom">
		<ul class="tangjl-form tangjl-text4">
			<li style="display: none;">
				<div>
					<input type="text" name="id" value="" />
				</div>
			</li>
			<li>
				<label>用户名:</label>
				<div>
					<input name="name" class="easyui-textbox"
						data-options="required:true" />
				</div>
			</li>
			<li>
				<label>性别:</label>
				<div>
					<select name="sex" class="easyui-combobox"
						data-options="editable:false,panelHeight:'auto',required:true">
						<option value="0">女</option>
						<option value="1">男</option>
					</select>
				</div>
			</li>
			<li class="textarea2">
				<label>备注:</label>
				<div>
					<input name="memo" class="easyui-textbox"
						data-options="multiline:true" style="height: 50px;" />
				</div>
			</li>
		</ul>
	</form>
</div>
<div id="dlg-buttons">
	<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="module.save();">保存</a>
	<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-nosave'" onclick="module.cancel();">取消</a>
</div>
</body>
</html>